FROM maven:3.6-alpine

COPY . /app
WORKDIR /app
RUN cd server && mvn package -Dmaven.test.skip=true && mv ./target/server-1.0.jar /tmp/ && rm -rf /app/* && mv /tmp/server-1.0.jar /app/
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/server-1.0.jar"]